const p1 = new Promise((resolve, reject) => {
    setTimeout(() => {
        resolve(111111)
    }, 3000)
})

const p2 = new Promise((resolve, reject) => {
    setTimeout(() => {
        reject(222222)
    }, 600)
})

const p3 = new Promise((resolve, reject) => {
    setTimeout(() => {
        resolve(333333)
    }, 1000)
})

//只要有一个Promise变成了fulfilled

Promise.race([p1, p2, p3]).then(res => {
    console.log("res:", res)
}).catch(err => {
    console.log("err:",err)
})